package com.example.basewarehouse.mvp;

import java.io.Serializable;

public class BaseResponse<T> implements Serializable {

    public int SUCCESS=200;
    public int LOGING_CODE=403;
    public String msg;
    public int code;
    public T data;

    /**
     * 是否正确返回数据
     * @return
     */
    public boolean success(){
        return SUCCESS==code;
    }

    /**
     * 是否正确返回数据
     * @return
     */
    public boolean isLogin(){
        return LOGING_CODE==code;
    }
}
